package com.attendance.service.impl;

import com.attendance.mapper.ProjectGroupMapper;
import com.attendance.pojo.ProjectGroup;
import com.attendance.service.ProjectGroupService;
import com.attendance.vo.ProjectGroupVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProjectGroupServiceImpl implements ProjectGroupService {

    @Autowired
    private ProjectGroupMapper projectGroupMapper;
    //查询全部
    @Override
    public List<ProjectGroupVO> selectAll(){
        return projectGroupMapper.selectAll();
    }

    //根据条件查询
    @Override
    public List<ProjectGroupVO> selectProjectGroup(String groName, String stuName, String stuNum){
        return projectGroupMapper.selectProjectGroup(groName,stuName,stuNum);
    }

    //新增分组
    @Override
    public int addProjectGroup(ProjectGroup projectGroup){
        return projectGroupMapper.addProjectGroup(projectGroup);
    }

//    新增学生
//    @Override
//    public int selectcId(Class class1){
//        return projectGroupMapper.addProjectGroupcl(class1);
//    }
//    @Override
//    public int addstudent(Student student){
//        return projectGroupMapper.addProjectGroupstu(student);
//    }


    //删除
    @Override
    public int deleteProjectGroup(String id){
        return projectGroupMapper.deleteProjectGroup(id);
    }

    //修改分组
    @Override
    public int updateProjectGroup(ProjectGroup projectGroup){
        return projectGroupMapper.updateProjectGroup(projectGroup);
    }

    //修改是否结业
    @Override
    public int modifyStatue1(String id){
        return projectGroupMapper.modifyStatue1(id);
    }

    //修改是否为组长
    @Override
    public int modifyStatue2(String id){
        return projectGroupMapper.modifyStatue2(id);
    }
}
